import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Index from '../views/Index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/index',
    name: 'Index',
    component: Index,
    children:[
      {
        path: '/SystemHomePage',
        name: 'SystemHomePage',
        component: () => import('../views/SystemHomePage/SystemHomePage.vue')
      },
      {
        path: '/PersonnelManagement',
        name: 'PersonnelManagement',
        component: () => import('../views/PersonnelManagement/PersonnelManagement.vue')
      },
      {
        path: '/PersonnelManagement-add',
        name: 'PersonnelManagement-add',
        component: () => import('../views/PersonnelManagement/PersonnelManagement-add.vue')
      },
      {
        path: '/PersonnelManagement-edit',
        name: 'PersonnelManagement-edit',
        component: () => import('../views/PersonnelManagement/PersonnelManagement-edit.vue')
      },
      {
        path: '/FinancialManagement',
        name: 'FinancialManagement',
        component: () => import('../views/FinancialManagement/FinancialManagement.vue')
      },
      {
        path: '/FinancialManagement-add',
        name: 'FinancialManagement-add',
        component: () => import('../views/FinancialManagement/FinancialManagement-add.vue')
      },
      {
        path: '/FinancialManagement-edit',
        name: 'FinancialManagement-edit',
        component: () => import('../views/FinancialManagement/FinancialManagement-edit.vue')
      },
      {
        path: '/EquipmentManagement',
        name: 'EquipmentManagement',
        component: () => import('../views/EquipmentManagement/EquipmentManagement.vue')
      },
      {
        path: '/EquipmentManagement-add',
        name: 'EquipmentManagement-add',
        component: () => import('../views/EquipmentManagement/EquipmentManagement-add.vue')
      },
      {
        path: '/EquipmentManagement-edit',
        name: 'EquipmentManagement-edit',
        component: () => import('../views/EquipmentManagement/EquipmentManagement-edit.vue')
      },
      {
        path: '/ReceptionManagement',
        name: 'ReceptionManagement',
        component: () => import('../views/ReceptionManagement/ReceptionManagement.vue')
      },
      {
        path: '/ReceptionManagement-add',
        name: 'ReceptionManagement-add',
        component: () => import('../views/ReceptionManagement/ReceptionManagement-add.vue')
      },
      {
        path: '/ReceptionManagement-edit',
        name: 'ReceptionManagement-edit',
        component: () => import('../views/ReceptionManagement/ReceptionManagement-edit.vue')
      },
      {
        path: '/managers',
        name: 'managers',
        component: () => import('../views/managers/managers.vue')
      },
      {
        path: '/managers-add',
        name: 'managers-add',
        component: () => import('../views/managers/managers-add.vue')
      },
      {
        path: '/managers-edit',
        name: 'managers-edit',
        component: () => import('../views/managers/managers-edit.vue')
      }
    ]
  },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
